package com.wowo.aoon;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

//默认名字为当前类名首字母小写
@Component("jgirl")
//@Controller
//@Service
//@Repository
public class JapanGirl implements Girl {
    @Value("竟三")
    private String name;
    @Value("12")
    private int age;

    public JapanGirl(){}
//    @Autowired
//    public JapanGirl(@Value("竟三") String name,@Value("30") int age){
//        this.age=age;
//        this.name=name;
//    }
    //@Value("竟三")
    public void setName(String name) {
        this.name = name;
    }
    //@Value("39")
    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String getName() {
        return name;
    }

    @Override
    public int getAge() {
        return age;
    }

    @Override
    public void Kiss() {
        System.out.println("JJJJJJJJJJJJJJ");
    }

    @Override
    public String toString() {
        return "JapanGirl{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
